<?php

namespace App\Api\V1\Requests\Boilerplate;

use Config;
use Dingo\Api\Http\FormRequest;

class SignUpRequest extends FormRequest
{
    public function rules()
    {
        return Config::get('boilerplate.sign_up.validation_rules');
    }

    public function authorize()
    {
        return true;
    }

    public function messages()
    {
        return [
            'name.required' => trans('validation.required', ['attribute' => '用户名']),
            'email.required' => trans('validation.required', ['attribute' => '邮箱']),
        ];
    }

}
